export interface AIConfig {
    provider: string;
    baseUrl: string;
    selectedModel: string;
}

export interface ModelListResponse {
    models: ModelList;
}

export type ModelTag = {
    name: string;
    modified_at: string;
    size: number;
};

export type ModelList = Array<ModelTag>;

export interface ModelInfo {
    name?: string;
    license: string | string[]; // 可以是字符串或字符串数组
    modelfile: string;
    parameters: string; // 保持为字符串，因为API返回的是格式化文本
    template: string;
    format: string;
    families: string[] | null; // 文档显示可能是null
    description?: string;
    details: {
        parent_model: string;
        format: string;
        family: string;
        families: string[] | null;
        parameter_size: string;
        quantization_level: string;
    };
    model_info?: Record<string, any>; // 动态字段，包含各种模型架构信息
    capabilities?: string[]; // 如["completion", "vision"]
}

export interface ModelInfoCache {
    [modelName: string]: ModelInfo | Promise<ModelInfo> | null;
}
